import request from '@/utils/request.js'
import upload from '@/utils/upload.js'
const baseUrl = import.meta.env.VITE_APP_API_HOST
/**
 * 保存检验报告地址
 * @param data
 */
export function saveReport(data) {
	return request({
		url: '/IQC/QmsZjiqcBase',
		method: 'PUT',
		data: data,
	})
}
/**
 * 上传报告
 * @param {Array} files
 * @param {Object} formData
 * @param {String}[formData.businessType='01'] formData.businessType
 * @param {'01'|'02'} formData.fileType
 * @param {String} formData.uniqueKey
 */
export function uploadAttachment(files, formData) {
	return upload({
		baseUrl: baseUrl+'/IQC/QmsZjiqcBase/uploadAttachment',
		files,
		formData
	})
}